<template>
	<view class="clear-record-vison">
		<view class="clear-main">
			<image style="width: 464rpx;" src="../../static/img/clear-icon.png" mode="widthFix"></image>
			<view class="name">
				清空全部聊天记录
			</view>
			<view class="text">
				被清空的聊天记录将无法恢复，请再次确认是否 清空所有个人和群的聊天记录
			</view>
		</view>
		<!-- <popup-affirm ref="affirm"  :popupInfo="popupInfo"></popup-affirm> -->
		<button class="clear-all-btn" @click="clearClick(type)">清空全部</button>
	</view>
</template>

<script>
	// import popupAffirm from '../component/popupAffirm.vue'
	export default {
		data() {
			return {
				type: 'center',
				popupInfo:{
					name:'清空全部聊天记录？',
					text:'清空聊天记录可能需要一些时间，清理过程中请耐心等候',
					btnText:'清理'
				}
			}
		},
		// components:{
		// 	popupAffirm
		// },
		onShareAppMessage() {},
		onNavigationBarButtonTap(e) {},

		watch: {},

		methods: {
			clearClick(type) {
				this.$refs.affirm.toggle(type)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.clear-record-vison{
		width: 100%;
		min-height: 100vh;
		background: #fff;
		padding-top: 170rpx;
	}
	
	.clear-main{
		display: flex;
		flex-direction: column;
		align-items: center;
		.name{
			font-weight: 500;
			font-size: 29rpx;
			color: #333333;
			margin: 20rpx 0 42rpx;
		}
		
		.text{
			width: 84%;
			font-size: 25rpx;
			color: #3D3D3D;
			text-align: center;
		}
	}
	.clear-all-btn{
		width: 60%;
		margin-top: 84rpx;
		height: 83rpx;
		background: #3F93FF;
		border-radius: 42rpx 42rpx 42rpx 42rpx;
		color: #fff;
	}
	
</style>